// javamaps
// Copyright (c) 2010 Maris Ramona
package Core;
import java.io.Serializable;

public class Color implements Serializable {
    private int R_;
    private int G_;
    private int B_;
    private int alpha_;

    /*
     * Constructori.
     */
    public Color(int R, int G, int B, int alpha){
        R_ = R;
        G_ = G;
        B_ = B;
        alpha_ = alpha;
    }

    public Color(int R, int G, int B){
        R_ = R;
        G_ = G;
        B_ = B;
        alpha_ = 255; // Opac.
    }

    /*
     * Metode publice.
     */
    public int R(){ return R_;}
    public void SetR( int R ){ R_ = R;}
    public int G(){ return G_;}
    public void SetG( int G ){ G_ = G;}
    public int B(){ return B_;}
    public void SetB( int B ){ B_ = B;}
    public int Alpha(){ return alpha_;}
    public void SetAlpha( int alpha ){ alpha_ = alpha;}

    //Pentru debugging.
    @Override
    public String toString(){
        return "R=" + R_ + ", G=" + G_ + ", B=" + B_ + ", A=" + alpha_;
    }
}
